import styles from './index.module.scss'
const Input = ({
    type="text",
    value,
    name,
    placeholder,
    onChange,
    extra,
    onExtraClick,
    ...rest
}) => {
    return (
        <div className={styles.root}>
      <input
        type={type}
        className="input"
        name={name}
        value={value}
        placeholder={placeholder}
        onChange={onChange}
        {...rest}
      />
      {extra && (
        <div className="extra" onClick={onExtraClick}>
          {extra}
        </div>
      )}
    </div>
    )
}
export default Input